package xuegao.study.mall.common.constant;

public interface AuthConstant {
    /**
     * 后台管理client_id
     */
    String ADMIN_CLIENT_ID = "admin-app";
    /**
     * 前台client_id
     */
    String PORTAL_CLIENT_ID = "portal-app";
    /**
     * 管理后台访问路径前缀
     */
    String ADMIN_SERVICE_PREFIX = "/admin/**";
    /**
     * 前台商城访问路径前缀
     */
    String PORTAL_SERVICE_PREFIX = "/admin/**";
    /**
     * JWT存储权限前缀
     */
    String AUTHORITY_PREFIX = "ROLE_";
    /**
     * 认证信息Http请求头
     */
    String JWT_TOKEN_HEADER = "Authorization";
    /**
     * JWT令牌前缀
     */
    String JWT_TOKEN_PREFIX = "Bearer ";

    /**
     * JWT存储权限属性
     */
    String AUTHORITY_CLAIM_NAME = "authorities";
    /**
     * Redis缓存权限规则key
     */
    String RESOURCE_ROLES_MAP_KEY = "auth:resourceRolesMap";

    /**
     * 用户信息Http请求头
     */
    String USER_TOKEN_HEADER = "user";
}
